
<%@page import="java.util.*"%>
<%--
    Document   : judgeshow
    Created on : 2012-3-7, 14:45:21
    Author     : xiaoxiao
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib  prefix="s"  uri="/struts-tags"%>
<jsp:useBean id="jd" class="mytools.judgeDAO" ></jsp:useBean>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>判断题列表</title>
        <link href="css/global.css" rel="stylesheet" type="text/css">
        <script  type="text/javascript" src="js/jquery.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                $('table.striped tr:even').addClass('even');
                $('table.striped tbody tr').mouseover(function() {
                    $(this).addClass('highlight');
                    $(this).css('cursor','pointer');
                }).mouseout(function() {
                    $(this).removeClass('highlight');
                });
            });
        </script>
    </head>
    <body>
        <div id="examup">
            <fieldset id="fieldset1">
                <s:form action="jpageAction" method="post">
                    <select name="subject" id="chaxun">
                        <option value="">选择科目</option>
                        <%
                                    Collection js = jd.getjudgesubject();
                                    Iterator it = js.iterator();
                                    while (it.hasNext()) {
                                        String temp = (String) it.next();
                        %>
                        <option value="<%=temp%>"><%=temp%></option>
                        <% }%>
                    </select>
                    <select name="chapter" id="chaxun">
                        <option value="">选择章节</option>
                        <%
                                    Collection jc = jd.getjudgechapter();
                                    it = jc.iterator();
                                    while (it.hasNext()) {
                                        String temp = (String) it.next();
                        %>
                        <option value="<%=temp%>">第<%=temp%>章</option>
                        <% }%>
                    </select>
                    <select name="level" id="chaxun">
                        <option value="">选择难度</option>
                        <option value="容易">容易</option>
                        <option value="中等">中等</option>
                        <option value="偏难">偏难</option>
                        <option value="难">难</option>
                    </select>
                    <input type="submit" value="确定" id="search">
                </s:form>
            </fieldset>
            <s:form action="judgedeletemany" method="post" >
                <table id="judgeshow" class="striped">
                    <thead>
                    <th>选择</th>
                    <th>题号</th>
                    <th>题型</th>
                    <th>科目</th>
                    <th>章节</th>
                    <th>章节信息</th>
                    <th>题目内容</th>
                    <th>答案</th>
                    <th>难度</th>
                    <th>查看/编辑</th>
                    <th>删除</th>
                    </thead>
                    <tbody>
                        <s:iterator value="alljudge" status="st">
                            <tr>
                                <td width="26px"><input type="checkbox" name="id" value="<s:property value="id"></s:property>"></td>
                                <td width="26px"><s:property value="id"></s:property></td>
                                <td width="40px"><s:property value="type"></s:property></td>
                                <td width="50px"><s:property value="subject"></s:property></td>
                                <td width="40px"><s:property value="chapter"></s:property></td>
                                <td width="100px"><s:property value="chapterinfo"></s:property></td>
                                <td><s:property value="name"></s:property></td>
                                <td width="30px"><s:property value="answer"></s:property></td>
                                <td width="40px"><s:property value="level"></s:property></td>
                                <td width="60px"> <a href="judgeview.action?id=<s:property value="id"></s:property>">查看/编辑</a></td>
                                <td width="26px"> <a href="judgedelete.action?id=<s:property value="id"></s:property>">删除</a></td>
                            </tr>
                        </s:iterator>
                    </tbody>
                </table>

                <input type="submit" name="button" id="submit" value="删除所选">
                <input type="button" name="button" id="submit" value="增加判断题"
                       onClick="location='judgeadd.jsp'">
            </s:form>

            <div id="fanye">
                <div id="ye">
                    共<s:property value="num"></s:property>题 &nbsp;
                    <s:property value="pagenumber"></s:property>/<s:property value="totalpage"></s:property> 页
                    <s:url id="firstpage" action="jpageAction">
                        <s:param name="pagenumber">1</s:param>
                    </s:url>
                    <s:a href="%{firstpage}">首页</s:a>

                    <s:url id="prepage" action="jpageAction">
                        <s:param name="pagenumber">
                            <s:property value="pagenumber-1"></s:property>
                        </s:param>
                    </s:url>
                    <s:a href="%{prepage}">上一页</s:a>

                    <s:url id="nextpage" action="jpageAction">
                        <s:param name="pagenumber">
                            <s:property value="pagenumber+1"></s:property>
                        </s:param>
                    </s:url>
                    <s:a href="%{nextpage}">下一页</s:a>

                    <s:url id="lastpage" action="jpageAction">
                        <s:param name="pagenumber">
                            <s:property value="totalpage"></s:property>
                        </s:param>
                    </s:url>
                    <s:a href="%{lastpage}">末页</s:a>
                </div>
                <div id="go">
                    <s:form action="jpageAction">
                        转到  第 <s:textfield id="tf" name="pagenumber" ></s:textfield> 页 <s:submit id="submit" value="GO"></s:submit>
                    </s:form>
                </div>
            </div>
        </div>
    </body>
</html>
